/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package DEMOS;

import edu.chalmers.AV_2DPlatformerFramework.Model.*;
import edu.chalmers.AV_2DPlatformerFramework.Utility.Vector2D;
import java.util.ArrayList;

/**
 *
 * @author Richard
 */
public class demo_GameModel extends GameModel {
    
    private final GameObject red, green, blue, redAnim, blueAnim;
    
    public demo_GameModel(){
        super();
        red = new demo_red(new Vector2D(0, 3));
        green = new demo_green(new Vector2D(2, 0));
        blue = new demo_blue(new Vector2D(-2, 0));
        
        blueAnim = new demo_blueAnim(new Vector2D(-2, 0));
        redAnim =  new demo_redAnim(new Vector2D(0, 3));
        
        red.setPosition(new Vector2D(540, 284));
        green.setPosition(new Vector2D(0, 200));
        blue.setPosition(new Vector2D(1080, 300));
        
        blueAnim.setPosition(new Vector2D(1080, 300));
        redAnim.setPosition(new Vector2D(540, 284));
        
        GameObject[] gwObjects = {
//                                        red,
                                        green,
//                                        blue,
                                        blueAnim,
                                        redAnim,
                                     };
        
        this.maps = new ArrayList<>();       
        GameWorld gw = new GameWorld    (new int[][] {
                                            {0, 200},
                                            {0, 0},
                                        },
                                            new Vector2D(2000, 2000), //out of sight
                                            ".\\src\\main\\java\\Textures\\dirtTile.jpg"
                                         );
        this.maps = new ArrayList<>();
        this.maps.add(new GameMap(gwObjects, gw)); 
        this.maps.get(0).setMainActor(red);   
        this.maps.get(0).setGravity(new Vector2D(0,0));
    }
    
    @Override
    public void run(){
        super.moveActiveObjects();
    }
}
